package org.nnxy.foodboot.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 用户评分实体类
 */
@Data
@TableName("user_rating")
public class UserRating {
    
    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    
    /**
     * 用户ID
     */
    private Long userId;
    
    /**
     * 食谱ID
     */
    private Long recipeId;
    
    /**
     * 评分（1-5）
     */
    private Integer rating;
    
    /**
     * 评价内容
     */
    private String comment;
    
    /**
     * 创建时间
     */
    private LocalDateTime createTime;
    
    /**
     * 更新时间
     */
    private LocalDateTime updateTime;
    
    @TableLogic
    @TableField(value = "del_flag")
    private String delFlag;
    
    @TableField(exist = false)
    private User user;
    
    @TableField(exist = false)
    private Recipe recipe;
} 